home *** CD-ROM | disk | FTP | other *** search
- Automatic Drop Shadow Maker AREXX script for OpalPaint v2.0 & above
- By Greg Niles, Centaur Development
-
-
- This script automates the process of creating transparent drop shadows for
- brushes in OpalPaint, for those who might need or want such a thing ;-))
-
- Actually, making drop shadows manually in OpalPaint is very easy; it's just
- that doing a lot of them really can use some automation, so the idea for
- this script was born. In the meantime, I added some things I use often for
- drop shadows, such as feathering.
-
- ***************** Installing Drop Shadow Maker *******************
-
- Pretty simple, really. First, copy the file "DropShadow.oprx" into your
- "OpalPaint:Rexx" directory, or "REXX:" logical device; OpalPaint searches
- these locations for ARexx scripts in this order. For simplicity's sake, I
- recommend you keep all your OpalPaint ARexx scripts in the "OpalPaint:Rexx"
- directory.
-
- After you've copied the script, run OpalPaint. Go to the Extras menu and
- click on the "ARexx Controls" button. You should see a few text boxes and
- a gadget at the lower center of the window that toggles between the
- different qualifiers for function keys. Click in the box of your choice
- and type "DropShadow" (you don't need the quotes or the .oprx extension).
- Now, the script is assigned to the corresponding key on your keyboard.
-
- ***************** How To Use Drop Shadow Maker *******************
-
- Press the key assigned to the Drop Shadow macro. All you need to do at
- this point is follow the directions.
-
- First, Drop Shadow Maker will ask which brush you would like to apply a
- drop shadow to: B1, B2, or B3. Type 1, 2, or 3 to use the corresponding
- brush.
-
- Next, the script will ask you how much "feathering", or fuzziness, you
- would like for your brush. Feathering add realism to your drop shadows
- by creating "soft" shadows instead of harsh, computer-looking ones.
- Typing 0 will create a hard-edged shadow, while larger numbers will create
- shadows that are more and more blurry. 5 is a good number to use for most
- applications, keep in mind that this number is in pixels, so the larger the
- number, the more the drop shadow shrinks.
-
- Next, you are presented with a slider for the amount of transparency of the
- drop shadow. Adjust this to your liking.
-
- At this point, OpalPaint will do a few operations on its own. You will
- notice that a new screen will appear and your selected brush will be pasted
- down in the center of the new screen. After these operations are
- completed, the script will then ask you for the position of the drop
- shadow; place the brush where you want the drop shadow to appear and click
- the left mouse button.
-
- Once that's done, the script goes through a few more steps on its own, and
- presents you with a requested when it's done. At this point, you will have
- a version of your original brush with a soft-edged, semi-transparent drop
- shadow (if you selected that) incorporated directly into the brush. Paste
- it over anything you want, and the effect will still be there.
-
- *********************** How it Works *************************
-
- The drop shadows are possible due to OpalPaint's 256-level alpha channel
- capability. All brushes in OpalPaint are actually 32-bit, because when
- you do any resizing, warping, or feathering to a brush, you actually
- modify the transparency of portions of the brush. Also, picking up a brush
- when there is an underlying alpha channel attached to the picture can be
- used in the brush itself, by specifying "Use Alpha" in the Cutout Brush
- Options menu.
-
- Here's what the ARexx script does:
-
- After receiving input from the user, the brush is pasted in the center of a
- spare screen AND into the alpha channel in the exact same position. Before
- pasting, the alpha channel is reversed so that pasting into the alpha
- channel cuts a transparent hole into the background picture (which happens
- to be black). Then, after feathering the brush by the specified number of
- pixels and asking for the position of the drop shadow, the script pastes
- the feathered version of the brush into the alpha channel only. Then, the
- brush is picked up in Paint Mode, with alpha channel turned on, so that
- black surrounding the brush is also picked up, but semi-transparent
- according the alpha channel. Now, the brush has a drop shadow attached to
- it.
-
- ********************* A few hints **************************
-
- OpalPaint automatically defaults to a black pattern when drawing the alpha
- channel. If you want to see what the program is doing while it's working
- (It doesn't slow anything down, and it helps to visualize the alpha mode)
- change the pattern to something else by right-clicking the AL button for
- work mode BEFORE running the script. I usually use one of the "wallpaper"
- patterns.
-
- Don't use feathering amounts over 10 pixels, unless your brush is really
- large; remember, the feather command actually works INWARD, so your brush
- actually gets smaller with more feathering.
-
- Keep a backup of your brush BEFORE you run this script, as once you've
- applied the drop shadow, you CANNOT undo it.
-
- The script creates a spare page in order to make the drop shadow, so if you
- are running low on memory, don't forget to delete the spare page after the
- brush has been created.
-
- ***************************************************************
-
-
- We'd love to see some of the results of this script. If you have any
- interesting pictures or AREXX scripts for OpalPaint, be sure to upload
- them to our OpalVision BBS - (310) 793-7142.
-
- Greg Niles, Centaur Development
-